package com.atguigu.jvm.day01;

import java.util.Random;

/**
 * @ClassName JvmDemo01
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-09-16 21:26
 * @Version 1.0
 */
public class JvmDemo01 {
    public static void main(String[] args) {
        /*long totalMemory = Runtime.getRuntime().totalMemory() ;//返回Java虚拟机中的内存总量。
        long maxMemory = Runtime.getRuntime().maxMemory() ;//返回Java虚拟机将尝试使用的最大内存量。
        long freeMemory = Runtime.getRuntime().freeMemory() ;//返回Java虚拟机中的可用内存量。
        System.out.println("TOTAL_MEMORY(-Xms) = " + totalMemory + "（字节）、" + (totalMemory / (double)1024 / 1024) + "MB");
        System.out.println("MAX_MEMORY(-Xmx) = " + maxMemory + "（字节）、" + (maxMemory / (double)1024 / 1024) + "MB");
        System.out.println("freeMemory = " + freeMemory + "（字节）、" + (freeMemory / (double)1024 / 1024) + "MB");*/

        String str = "www.atguigu.com";
        while (true) {
            str += str + new Random().nextInt(88888888) + new Random().nextInt(999999999);
        }

    }
}
